package cn.anecansaitin.firecrafting.common.block.entity;

import cn.anecansaitin.firecrafting.ModConstant;
import cn.anecansaitin.firecrafting.common.block.ModBlocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModBlockEntityTypes {
    //创建实体注册器
    public static final DeferredRegister<BlockEntityType<?>> ENTITY = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, ModConstant.MOD_ID);
    //注册实体
    public static final RegistryObject<BlockEntityType<FireInterfaceEntity>> FIRE_INTERFACE_ENTITY = ENTITY.register("fire_interface_entity", () -> BlockEntityType.Builder.of(FireInterfaceEntity::new, ModBlocks.FIRE_INTERFACE.get()).build(null));

    public static void registry(IEventBus bus) {
        ENTITY.register(bus);
    }
}
